package com.cskaoyan.market.controller.wx;/*
 *文件名: WxBrandController
 *创建者:wxin
 *创建时间:2024/5/21 9:28
 */

import com.cskaoyan.market.db.domain.MarketBrand;
import com.cskaoyan.market.service.wx.WxBrandService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {
    @Autowired
    WxBrandService wxBrandService;

    @GetMapping("list")

    public Object list(Integer limit,Integer page){
        List<MarketBrand> marketBrandList = wxBrandService.list(limit, page);
        return ResponseUtil.okList(marketBrandList);
    }

    @GetMapping("detail")

    public Object detail(Integer id){
        MarketBrand detail = wxBrandService.detail(id);
        return ResponseUtil.ok(detail);
    }

}
